<?xml version="1.0" encoding="UTF-8" ?>
<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.joda.org/joda/time/tags" prefix="joda" %>
<!DOCTYPE html">
<html>
<head>

<%@ include file="../../commons/headfiles-jquery.jsp" %>
<link href="${base}css/apps/report/show.css" media="all" rel="stylesheet" type="text/css"/>
</head>
<body>
<form id="armform">
<c:if test="${not empty bean.id}">
<input type="hidden" id="bean.id" name="bean.id"
			value="${bean.id}" />
</c:if>
    
    <input type="hidden" name="bean.department.id" value="${empty bean.department?loginUser.department.id:bean.department.id}" />
	<input type="hidden" name="bean.maker.username" value="${empty bean.maker?loginUser.username:bean.maker.username}" />
	<input type="hidden" name="bean.createDate" value="<joda:format value="${bean.createDate}" pattern="yyyy-MM-dd" />" />
	
	<table id="itemlist" class="table table-condensed table-hover table-bordered">
		<caption>
		  <joda:format value="${bean.createDate}" pattern="yyyy-MM-dd" />成品生产月报
		</caption>
		<thead >
		
			<tr>
				<td colspan="17">
				 	<!-- 
				 	<button id="saveBtn" type="button" class="btn btn-success">
						<i class="icon-disk"></i>保存
					</button>
				   	
				    <button id="showbtn" type="button" class="btn btn-success">
				                                               添加产品
					</button>			
							 <button type="button" onclick="test()">
						测试
					</button>
				   -->
				</td>			
				
				
			</tr>
			
			<tr>
  <th  rowspan="2"  
					>代码	</th>
  <th  rowspan="2"  
					>名称	</th>
  

    <th colspan="2"  
					>期初结存</th>
	<th rowspan="2">本月计划</th>
  	<th colspan="2"  
					>动工</th>
  	<th colspan="2"  
					>合格</th>
 
  <th colspan="2"  
					>废品</th>
  <th colspan="2"  
					>试销</th>
  <th colspan="1"  
					>月末在产</th>
  <th rowspan="2"  
					>备注</th>
  <th rowspan="2"  
					>产品类型</th>
          </tr>
<tr>
  
     <th  
					>
					年初</th>
     <th   
					>
					月初</th>
	 <th  
					>
					当月</th>
	 <th   
					>
					累计</th>
	 <th  
					>
					当月</th>
	 <th   
					>
					累计</th>

				<th  
					>
					当月</th>
				<th   
					>
					累计</th>
				<th  
					>
					当月</th>
				<th  
					>
					累计</th>
				<th   
					>结存</th>
				
			</tr>
		</thead>
		
		
		<c:set var="gindex" value="0" scope="request"/>
		<tbody id="pdtBody">
			<tr>
		     <td colspan="17" style="background-color: #aaa">
		      <span style="color: 000;font-size:14px;font-weight:bolder" >常规产品</span>
		               		       	               
		     </td>
		   </tr>
		   <c:set var="armItems" value="${bean.classifiedItems['常规产品']}" />
            		   
		   <%@ include file="itemList.jsp" %>	 
		   <tr>
		     <td colspan="17">
		            
		      
		     &copy;</td>
		   </tr>
		   
		   
		   
		   <tr>
		     <td colspan="17" style="background-color: #aaa">
		      <span style="color: 000;font-size:14px;font-weight:bolder" >厂内配套</span>
		               		       	               
		     </td>
		   </tr>
		   <c:set var="armItems" value="${bean.classifiedItems['厂内配套']}" />
		   <%@ include file="itemList.jsp" %>	 
		   <tr>
		     <td colspan="17">&copy;</td>
		   </tr>
		   	   
		   
		   <tr>
		    <td colspan="17" style="background-color: #aaa">
		      <span style="color: 000;font-size:14px;font-weight:bolder" >其他</span>
		               		       	               
		     </td>
		   </tr>
		   <c:set var="armItems" value="${bean.classifiedItems['其他']}" />
		   <%@ include file="itemList.jsp" %>	 
		   
		   <tr>
		    <td colspan="17" style="background-color: #aaa">
		      <span style="color: 000;font-size:14px;font-weight:bolder" >上月动工本月未动工</span>
		               		       	               
		     </td>
		   </tr>
		   
		   <c:set var="armItems" value="${bean.lastItems}"/>
		   <%@ include file="itemList.jsp" %>	
		   <tr>
		     <td colspan="17">&copy;</td>
		   </tr>
		</tbody>
		<tfoot>
		<tr>
		  <td colspan="17">&copy;</td>
		</tr>		
		</tfoot>
		
	</table>	
</form>
<script type="text/javascript">
  var lastrpt = '${bean.last.id}'||false;
  var rptId   = '${bean.id}'||false; 
  var itemIndex = '${fn:length(bean.armItems)}'||0;
</script>
<script type="text/javascript" src="${base}scripts/apps/reporter/edit.js"></script>
<script type="text/javascript" src="${base}scripts/apps/reporter/finished/edit.js"></script>
<div id="debug"></div>
</body>
</html>
